Skip to content

Fix: Skip non-vertex PLY elements instead of throwing#56

Merged
scier merged 1 commit intoscier:mainfrom
orbitalelliott:fix/skip-non-vertex-ply-elements
Feb 17, 2026
Merged

Fix: Skip non-vertex PLY elements instead of throwing#56
scier merged 1 commit intoscier:mainfrom
orbitalelliott:fix/skip-non-vertex-ply-elements

Conversation

@orbitalelliott
Copy link

Problem

PLY files from tools like ml-sharp include extra metadata elements alongside vertex data:

element vertex 1179648
property float x
...
element extrinsic 16
property float extrinsic
element intrinsic 9
property float intrinsic
element image_size 2
property uint image_size

SplatPLYSceneReader.read() throws unsupportedFileContents("Expected type index 0, found 1") when it encounters these non-vertex elements in the async stream, instead of skipping them.

Fix

Changed the guard clause in SplatPLYSceneReader.swift:51 from throwing an error to continue, so non-vertex element types are silently skipped.

Testing

Tested with ml-sharp PLY files containing 8 element types (vertex, extrinsic, intrinsic, image_size, frame, disparity, color_space, version). Vertex data loads correctly, metadata elements are skipped.

PLY files from tools like ml-sharp include extra metadata elements
(extrinsic, intrinsic, image_size, frame, etc.) alongside vertex data.
The reader was throwing unsupportedFileContents when encountering these
non-vertex elements. Changed to skip them with `continue` instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@scier scier merged commit 580f4ff into scier:main Feb 17, 2026
@scier
Copy link
Owner

scier commented Feb 17, 2026

Thank you for the PR! Validated the regression and your fix.

@orbitalelliott
Copy link
Author

orbitalelliott commented Feb 18, 2026 via email

@scier
Copy link
Owner

scier commented Feb 18, 2026

I haven’t used RCP to record anything lately. RCP crashes or MetalSplatter? If it’s MetalSplatter crashing, then guessing it’s a side effect of the performance impact (or turning off foveated rendering, although I’ve run recently without foveation and it worked fine). And actually there’s a chance it’s related to a bug I’m in the middle of fixing that can cause problems around dropped frames. So once I fix that, might be worth trying again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants